﻿@model TJBHJJ.Models.Message
@{
    ViewBag.Title = "在线留言";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    在线留言</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")" type="text/javascript"></script> 
@*@using (Ajax.BeginForm("Add","Message",new AjaxOptions { 
    UpdateTargetId = "main", 
    HttpMethod = "POST", 
    InsertionMode = InsertionMode.Replace
}))*@
@using(Html.BeginForm("Add","Message",FormMethod.Post))
{
    @Html.ValidationSummary(true)
    <table>
        <tr>
            <td>
                标题：
            </td>
            <td>
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </td>
        </tr>
        <tr>
            <td>
                姓名：
            </td>
            <td>
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </td>
        </tr>
        <tr>
            <td>
                QQ：
            </td>
            <td>
                @Html.EditorFor(model => model.QQ)
                @Html.ValidationMessageFor(model => model.QQ)
            </td>
        </tr>
        <tr>
            <td>
                E-Mail:
            </td>
            <td>@Html.EditorFor(model => model.E_mail)
                @Html.ValidationMessageFor(model => model.E_mail)
            </td>
        </tr>
        <tr>
            <td>
                内容：
            </td>
            <td>
                @Html.TextAreaFor(model => model.Content)
                @Html.ValidationMessageFor(model => model.Content)
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" value="提交" />
            </td>
        </tr>
    </table>
}
